Repository navigation
refactor(core): separate generic runtime primitives from domain specifics and fix live playthrough P0/P1 defects - #39
Merged
Conversation
…fics and fix live playthrough P0/P1 defects refactor: extract generic building blocks and enforce vendor separation Extract reusable, engine-free building blocks into Application so Core and submodules share one implementation, and remove vendor-specific literals from generic infrastructure. - Add OpenAIWireCodec, LlmPayloadParser, HttpErrorClassifier, EndpointFailoverPolicy, LogSecretRedactor, PromptZonePartitioner, RimMindHttpClientPool, MoteTextFormatter, ToolScopeProjection, AutonomyDomainRiskMapper, and UnboundedCompletionFence; forward the old LogSanitizer/OpenAIRequestSerializer facades to the new types. - Replace HttpTransport's OpenCode header sniffing with an IHttpRequestDecorator seam plus a concrete OpenCodeHeaderDecorator. - Make MechanismToolHandler resolve autonomy domains via IMechanismAutonomyMetadata instead of hardcoding pawn.work, and reject write operations off the Unity main thread. - Add ToolScope flags and scope-filtered, compacted tool definitions; introduce AgentDecision/AdvisorDecision scenarios with shared decision weights and ScenarioIds.IsDecisionScenario. - Add request queue coalescing, MaxQueueWaitTicks/ExpiresAtUtc TTLs, pre-dispatch colonist liveness gating, and CancelByNpcId. - Split MapContextBuilder into static topology vs volatile colony resources, add MapResourceCounter, and clear caches on game lifecycle. - Add AIProviderRegistry presets, BioTabBadgeRegistry with a single DoTopStack transpiler, RimMindChatWindowBase, SettingsUIDrawer secret fields, and generic API helpers (ActorMapResolver, CompositeToolCallBase, WorldScopedComponentCache). - Default settings and backup endpoints now use OpenAI instead of DeepSeek/OpenCode; drop the OpenCode backup button and its strings. - Add architecture and phase-2 contract tests locking in these boundaries.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Separates generic runtime primitives (IHttpRequestDecorator, ToolScopeProjection, LlmPayloadParser, OpenAIWireCodec, PromptZonePartitioner, HttpErrorClassifier, EndpointFailoverPolicy, RimMindHttpClientPool, CompositeToolCallBase, RimMindChatWindowBase, SettingsUIDrawer, IBioTabBadgeProvider) from vendor/submodule specifics; splits AgentDecision/AdvisorDecision scenarios with ScenarioIds.IsDecisionScenario; enforces main-thread dispatch, KV-cache L1/L2 purity, honest cached token telemetry, queue coalescing/TTL/lifecycle cancellation, and idle overlay hiding. Verified with 209/209 Core tests, ArchTests, and 4-day live playthrough (0 Verse errors, 75.39% real KV-cache hit rate).